1. Field of the Invention
The present invention relates to a fast variable-mode determining method required for motion estimation of a macroblock of a P-frame during H.264/AVC video compression.
2. Description of the Related Art
According to the H.264/AVC standard, to reduce residual data for an improvement in compression efficiency, a 16×16 macroblock is divided into sub-blocks, motion is searched in each of the sub-blocks, and a mode having the smallest error is selected and transmitted.
However, in such a scheme, as the number of divided sub-blocks increases, the number of motion vectors also increases up to 16. As a result, it is not possible to divide a macroblock into the smaller sub-blocks. Thus, in the H.264/AVC standard, a mode having a smallest number of required bits is selected using a rate-distortion (R-D) cost function and is then transmitted.
According to the H.264/AVC standard, in encoding of a P-frame during a video compression process, a full search for an intra mode is performed after a search for an inter mode, so as to determine a mode requiring the smallest R-D cost as a final mode. However, doing a search for an intra mode in all macroblocks of a P-frame for which a search for an inter mode is already performed requires a large amount of computation.